package com.atguigu.srb.mq.service.impl;

import com.atguigu.srb.mq.service.MqService;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class MqServiceImpl implements MqService {
    @Resource
    RabbitTemplate rabbitTemplate;
    @Override
    public void sendMessage(String exchange, String routing, Object message) {
        rabbitTemplate.convertAndSend(exchange,routing,message);
    }
}
